package Employee;

import People.*;

import java.util.Scanner;

public class HourlyEmployee implements Employee{
    int hour;
    int Month;
    int hourSalary;



    @Override
    public double getSalary(int month) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入名字");
        String Name = scanner.nextLine();

        System.out.println("请输入生日月份");
        this.Month = scanner.nextInt();
        System.out.println("请输入工作时间");
        this.hour = scanner.nextInt();
        System.out.println("请输入时薪");
        this.hourSalary = scanner.nextInt();

        double money = 0;
        if(hour>160){
            money = (160*hourSalary)+(1.5*hourSalary*(hour-160));
        }else{
            money = hour*hourSalary;
        }
        return money==Month?money+100:money;


    }
}
